/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   LookLeftAndRight.h
 * Author: czq
 *
 * Created on March 27, 2018, 10:30 AM
 */

#ifndef LOOKLEFTANDRIGHT_H
#define LOOKLEFTANDRIGHT_H
option(LookLeftAndRight, (float)(0.38f)pan, (float)(0.f)tilt)
{
    initial_state(lookLeft)
    {
        transition
        {
            if(action_done && state_time > 800.f)
                goto lookRight;
        }
        action
        {
            //Vector3f theLeft(2000.f,1000.f,50.0f);
            //SetHeadTargetSpeedRequest(theLeft, float(pi));
            SetHeadPanTilt(-pan, tilt, 150_deg);
        }
    }
    
    state(lookRight)
    {
        transition
        {
            if(action_done && state_time > 800.f)
                goto lookLeft;
        }
        action
        {
            //Vector3f theRight(2000.f,-1000.f,50.0f);
            //SetHeadTargetSpeedRequest(theRight, float(-pi));
            SetHeadPanTilt(pan, tilt, 150_deg);
        }
    }
}


#endif /* LOOKLEFTANDRIGHT_H */

